package com.liliya;

import com.liliya.dao.impl.*;
import com.liliya.pojo.*;
import com.liliya.service.SubCateService;
import com.liliya.service.UserService;
import com.liliya.service.impl.CateServiceImpl;
import com.liliya.service.impl.RoleServiceImpl;
import com.liliya.service.impl.SubCateServiceImpl;
import com.liliya.service.impl.UserServiceImpl;
import com.liliya.utils.RandomFile;

import java.text.SimpleDateFormat;
import java.util.List;

/**
 * @Description TODO
 * @Author hhy
 * @Date 2021/1/5 11:39
 */
public class Main {
    public static void main(String[] args) {
//        ProDaoImpl proDao = new ProDaoImpl();
//        Pro pro = new Pro();
//        pro.setProname("zk2");
//        proDao.insertPro(pro);
//
//        String yyyy年MM月dd日 = new SimpleDateFormat("yyyy年MM月dd日 hh:mm:ss S").format(System.currentTimeMillis());
//        System.out.println(yyyy年MM月dd日);
//        AdDaoImpl adDao = new AdDaoImpl();
//        Ad ad = adDao.findAd(1);
//        System.out.println(ad.getAdname());

        OrderDaoImpl orderDao = new OrderDaoImpl();
        List<Order> orders = orderDao.findOrders();
        for (Order order : orders) {
            System.out.println(order);
        }

        System.out.println(orderDao.total());

        System.out.println(orderDao.findOrderByOrderNum(1));

    }
}
